package inherit;
class Animal{
    String name;
    int age;
    float weight;
}
class Cat extends Animal {
    public void eat(){
        System.out.println(name + "正在吃饭");
    }
    public void sleep()
    {
        System.out.println(name + "正在睡觉");
    }
    void mew(){
        System.out.println(name + "喵喵喵~~~");
    }
}

 class Dog extends Animal{
    public void eat(){
        System.out.println(name + "正在吃饭");
    }
    public void sleep(){
        System.out.println(name + "正在睡觉");
    }
    void Bark()
    {
        System.out.println(name + "汪汪汪~~~");
    }
}

public class Test {
    public static void main(String[] args) {
    Cat cat = new Cat();
    cat.name ="喵喵";
    cat.age = 19;
    }
}
